<div id="group_photos">
  <%@group_photos.each do |group_photo|%>
    <%=render :partial=>'group_photo',:locals=>{:group_photo=>group_photo}%>
  <%end%>
</div>
<br/>
<div style="float:right">
  <a href="#" onclick="Element.toggle('new_group_photo_form');return false">添加合影活动</a>  |
  <%=link_to "返回",event_path(:id=>@event.id)%>
</div>
<br />
<div id="new_group_photo_form" style='display:none'>
  <%remote_form_for :group_photo,:url=>{:controller=>'group_photos',:action=>'create',:event_id=>@event.id},:html=>{:id=>'group_photo_form'} do |f|%>
      <div id="errors" style="display:none">
      </div>
      <br/>
      <div class="fields text_fields">
        <%= f.label :location,"合影地点" %><%= f.text_field :location %><br clear="all"/>
      </div>
      <div class="fields text_fields">
        <%= f.label :occurs_on,"合影时间" %><%= f.datetime_select :occurs_on %><br clear="all"/>
      </div>
      <%fields_for "rows_cols" do |c_f|%>
        <div class="fields select_fields">
          <%= c_f.label :rows,'排数:' %><%= c_f.select(:rows,(1..50)) %><br clear="all"/>
        </div>
        <div class="fields select_fields">
          <%= c_f.label :cols,'每排最多人数:' %><%= c_f.select(:cols,(1..30))%><br clear="all"/>
        </div>
      <%end%>
      <div class="buttons">
      <div class="lt_button">
        <%= f.submit '创建合影信息',:class=>'submit'%>
      </div>
    </div>
  <%end%>
</div>
